package com.naizhuai.ui.entity;

import com.contrarywind.interfaces.IPickerViewData;
import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * @author：lichenxi
 * @date 2018/5/16 12
 * email：525603977@qq.com
 * Fighting
 */
public class CommonLabel implements IPickerViewData, Cloneable {
    public String label;
    public String key;
    public String rootId;
    @SerializedName("subLabel")
    public List<CommonLabel> msubList;

    public CommonLabel(String key, String label) {
        this.key = key;
        this.label = label;
    }

    public CommonLabel(String label) {
        this.label=label;
    }

    @Override
    public String getPickerViewText() {
        return label;
    }

    @Override
    public CommonLabel clone() {
        CommonLabel clone = null;
        try {
            clone = (CommonLabel) super.clone();

        } catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);  // won't happen
        }

        return clone;
    }
}
